package com.letoken.platform.app.job;


import com.letoken.platform.app.service.AppFundInfoService;
import com.letoken.platform.repo.admin.dao.AdminFundConfigMapper;
import com.letoken.platform.repo.app.dao.AppFundInfoMapper;
import com.letoken.platform.repo.app.po.AppFundInfo;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;

@Component
public class FundResumptionJog {
    @Resource
    AppFundInfoMapper appFundInfoMapper;

    @Autowired
    AdminFundConfigMapper adminFundConfigMapper;

   @Autowired
   AppFundInfoService appFundInfoService;

    @XxlJob("fundResumption")
    public void fundResumption(){
        List<AppFundInfo> infoList = appFundInfoMapper.getExpireList();
        for (AppFundInfo appFundInfo:infoList) {
            appFundInfoService.fundResumption(appFundInfo);
        }
    }
}
